package com.glsc.ngateway.common.xir.domain;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 此表放债券类交易，如同业拆借，同业存款，质押式回购，不同产品通过A_TYPE来区别
 */
@Data
@Entity
@Table(name = "XIR_TRD.TTRD_OTC_IBLB")
public class TtrdOtcIblb implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 金融工具代码
     */
    @Id
    @Column(name = "I_CODE", nullable = false)
    private String iCode;

    /**
     * 资产类型
     */
    @Column(name = "A_TYPE", nullable = false)
    private String aType;

    /**
     * 市场类型
     */
    @Column(name = "M_TYPE", nullable = false)
    private String mType;

    @Column(name = "CURRENCY", nullable = false)
    private String currency;

    @Column(name = "Q_TYPE", nullable = false)
    private String qType;

    /**
     * 产品分类，默认为资产类型名称，用户可以修改
     */
    @Column(name = "P_CLASS")
    private String pClass;

    @Column(name = "RATE", nullable = false)
    private String rate;

    @Column(name = "AMOUNT", nullable = false)
    private String amount;

    @Column(name = "FSTSETDATE", nullable = false)
    private String fstsetdate;

    @Column(name = "FSTSETTYPE")
    private String fstsettype;

    @Column(name = "ENDSETDATE", nullable = false)
    private String endsetdate;

    @Column(name = "DAYCOUNT", nullable = false)
    private String daycount;

    @Column(name = "ENDSETTYPE")
    private String endsettype;

    @Column(name = "TERM")
    private String term;

    @Column(name = "P_TYPE")
    private String pType;

    /**
     * 回购费用
     */
    @Column(name = "AIAMOUNT")
    private String aiamount;

    /**
     * 首期交收日期
     */
    @Column(name = "FSTSETDATE_REAL")
    private String fstsetdateReal;

    /**
     * 到期交收日期
     */
    @Column(name = "ENDSETDATE_REAL")
    private String endsetdateReal;

    /**
     * 提前购回利率
     */
    @Column(name = "PRE_RATE")
    private String preRate;

    /**
     * 实际回购费用(默认为回购费用，到期结算流水对账时刷新)
     */
    @Column(name = "AIAMOUNT_ACTUAL")
    private String aiamountActual;

    /**
     * 意向期限(用户输入的期限)
     */
    @Column(name = "TERM_PURPOSE")
    private String termPurpose;

    /**
     * 到期资金延期交收日期
     */
    @Column(name = "ENDSETDATE_OVER")
    private String endsetdateOver;

    /**
     * 回购利率参考
     */
    @Column(name = "REAL_REFERENCE")
    private String realReference;

    /**
     * 0表示质押券没有还本，全部表示有
     */
    @Column(name = "HASPLEDGBONDRETURNCORPUS")
    private String haspledgbondreturncorpus;

    /**
     * 协议回购：到期确认号
     */
    @Column(name = "END_EXTORDID")
    private String endExtordid;

    /**
     * 终止利率
     */
    @Column(name = "TERMINATE_RATE")
    private String terminateRate;

    /**
     * 履约保障比例警戒线
     */
    @Column(name = "PROMISE_GUARD_RATE")
    private String promiseGuardRate;

    /**
     * 履约保障比例最低线
     */
    @Column(name = "PROMISE_MIN_RATE")
    private String promiseMinRate;

    /**
     * 法透结算方式(法透专用)
     */
    @Column(name = "OVERDRAFT_SETTYPE")
    private String overdraftSettype;

    /**
     * 标识三方回购交易券所属篮子
     */
    @Column(name = "TRIBASKET")
    private String tribasket;

    /**
     * 违约后担保品是否由质权人处置(三方回购)
     */
    @Column(name = "ISBREAKCONTRACTBYPAWNEE")
    private String isbreakcontractbypawnee;

    /**
     * 到期罚息金额
     */
    @Column(name = "END_PENALTY_AIAMOUNT")
    private String endPenaltyAiamount;

    /**
     * 初始交易编号
     */
    @Column(name = "INIT_TRADEID")
    private String initTradeid;

    /**
     * 加权利率加点(BP)
     */
    @Column(name = "REPOBP")
    private String repobp;

    /**
     * 是否利率配置刷新
     */
    @Column(name = "ISREFRESHRATE")
    private String isrefreshrate;

    /**
     * 回购利率类型：ACTUAL(实际利率)、WEIGHT(加权利率加点)、MARKET(市价利率)
     */
    @Column(name = "RATETYPE")
    private String ratetype;

    /**
     * 1-双边回购，3-通用回购
     */
    @Column(name = "REPO_METHOD")
    private String repoMethod;

    /**
     * 是否协议回购到期确认
     */
    @Column(name = "ISAGREEMENTREPOEND")
    private String isagreementrepoend;

    /**
     * 中债登金额
     */
    @Column(name = "AMOUNT_ZZD")
    private String amountZzd;

    /**
     * 清算所金额
     */
    @Column(name = "AMOUNT_QSS")
    private String amountQss;

    /**
     * 是否银行间跨托管回购
     */
    @Column(name = "ISACCROSSHOSTREPO")
    private String isaccrosshostrepo;

    /**
     * 是否纾困质押式回购
     */
    @Column(name = "ISBAILOUT")
    private String isbailout;

    /**
     * 质押券调整默认托管市场(解决跨市场问题)
     */
    @Column(name = "MIAN_HOST_MRAKET")
    private String mianHostMraket;

}
